<!--
* @description 外地来平列表
!-->

<!-- 单页面需要多个上传组件 -->
<template>
  <div>
    <el-dialog :title="'管控中'" width='70%' :visible.sync="dialogFormVisible">
      <div>

        <!-- 表格 -->
        <div style="margin-top: 10px">
          <el-table :data="tableData" style="width: 100%" class="tableScroll" highlight-current-row
            @current-change="tableSelect">
            <el-table-column prop="name" label="姓名"></el-table-column>

            <el-table-column prop="tel" label="手机号码"></el-table-column>
            <el-table-column prop="data1" label="隔离点"></el-table-column>
            <el-table-column prop="data2" label="管控时间"></el-table-column>
            <el-table-column prop="data3" label="管控策略"></el-table-column>

          </el-table>
        </div>
        <!-- 分页 -->
        <!-- <div v-if="tableData.total" class="block" style="margin-top: 10px; text-align: right">
          <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange"
            :current-page="searchList.current" :page-size="searchList.size"
            layout="sizes,total, prev, pager, next, jumper" :page-sizes="[7, 20, 30, 40]"
            :total="Number(tableData.total)"></el-pagination>
        </div> -->
      </div>
      <div slot="footer" class="dialog-footer">
        <!-- <el-button type="primary" @click="confirm()">确 定</el-button>
				<el-button @click="dialogFormVisible = false">取 消</el-button> -->
      </div>
    </el-dialog>
    <detailComp :title="'家庭成员'" ref="updateComp"></detailComp>

  </div>
</template>
<script>
import detailComp from "./detail.vue";
export default {
  name: "page",
  components: {
    detailComp,
  },
  props: {
    apiName_params: {
      type: String,
      default: "",
    },
  },
  data() {
    return {
      tableData: [
        // {
        //   name: "张三",
        //   tel: "178586920392",
        //   data1: "昆阳镇三阳旅馆",
        //   data2: "5天",
        //   data3: "7+7",
        // },
      ],
      headerList: [],
      searchList: {
        current: 1,
        size: 7,
      },
      inputModel: {},
      infoList: {},
      dialogFormVisible: false,
      dataRow: "",
    };
  },
  created() {},
  methods: {
    hide: function () {
      // this.$emit("refresh");
    },
    detailShow: function (row) {
      const inputModel = row;
      this.$refs.updateComp.show();
      setTimeout(() => {
        this.$refs.updateComp.initData({
          inputModel: inputModel,
        });
      }, 0);
    },
    confirm() {
      this.$emit("saveFn", this.inputModel);
      this.hide();
    },
    /**
     * 初始化数据
     */
    initData: function (dataParams) {
      this.searchList = { ...this.searchList, ...dataParams };
      this.getData();
    },
    show: function (type, id) {
      this.dialogFormVisible = true;
      // this.clearData();
      // this.$emit('hide');
    },
    /**
     * 关闭弹出框
     */
    hide: function () {
      // this.clearData();
      this.dialogFormVisible = false;
    },
    //增加搜索条件
    addSearchCriteria(key, value) {
      this.searchList[key] = value;
      console.log(this.searchList);
    },
    tableSelect(val) {
      this.inputModel = val;
    },
    //分页选择每页多少条
    handleSizeChange(val) {
      this.searchList.size = val;
      this.getData();
    },
    //分页当前页
    handleCurrentChange(val) {
      this.searchList.current = val;
      this.getData();
    },
    getData(current) {
      return;
      var apiName = "getBackHomeArea_dataScreen";

      var params = this.searchList;
      this.$myApi[apiName](params).then((res) => {
        if (res.code == 200) {
          this.tableData = res.data.content;
          this.headerList = res.data.header;
        }
      });
    },
  },
};
</script>
<style>
</style>
